package com.sx.baseproject.framework.net

import com.sx.baseproject.framework.net.base.GetBaseRequest
import com.sx.baseproject.framework.net.base.MyOkGo
import com.sx.baseproject.framework.net.response.TestBean
import com.sx.baseproject.framework.net.response.TestList
import io.reactivex.Observable

/**
 * @Description
 * @Author 梁浩文
 * @Date 2021/10/21 10:59
 */
open class HttpModelImpl : ApiResource(), HttpModel {
    override fun getBean(): Observable<TestBean> =
        MyOkGo.getInstance().RxHttp(getApi("/base/newSchool"), TestBean::class.java)

    override fun getListBean(): Observable<MutableList<TestList>> =
        MyOkGo.getInstance().RxHttp(
            getApi("/driver/nearbyScopeDrivers"), GetBaseRequest()
                .add("lon", "113.72854527777778")
                .add("lat", "22.978970277777776"), TestList::class.java
        )
}